home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '87 / Source ƒ.sea / Source ƒ / Pascal ƒ / showoff ƒ / ShowOff.Doc
Encoding:
Text File  |  1987-04-11  |  2.8 KB  |  42 lines  |  [TEXT/MACA]

  1. ==============================================================================
  2.         ABOUT 'SHOWOFF' FOR LIGHTSPEED PASCAL
  3. ==============================================================================
  4.  
  5. The files contained in the PackIt file are the first two training programs from the book "How To Write Macintosh Software" written by Scott Knaster of Apple.
  6.  
  7. For those of you just starting to program on the Macintosh, I highly recommend this book.  Scott has done an excellent job of making the Macintosh programming environment understandable.
  8.  
  9. Believe me when I say that programming an easy to use program for the Mac is much more complex than using the finished product.  
  10.  
  11. The program 'ShowOff' is introduced in chapter 7 of the book, 'Real Live Debugging'.  For those programming in LightSpeed Pascal 'debugging' is sort of an understatement, it can take hours just to get to the point of starting to debug along with the book.
  12.  
  13. The Pascal program 'ShowOff' is written in MPW Pascal, which differs from LightSpeed in several ways, the most obvious being that MPW accepts incompatible 'typing' on a single line of MPW Pascal code.  
  14.  
  15. While this is nice for MPW Macintosh programmers, as the Mac environment forces mixing of types with regular frequency, it can be quite frustrating when MPW source is used with a 'classical' Pascal compiler, in as far as 'typing' is concerned.  LightSpeed is such a complier.
  16.  
  17. For those of you who are just learning to program either the Macintosh or LightSpeed Pascal I offer these conversions to ease your learning curve.
  18.  
  19. The first program is 'ShowOff 7-1'.  This is the first exercise in debugging a Mac program.  This version is converted to LightSpeed, with all 'bugs' intact so you may happily go 'bug hunting'.  Except as noted in the source code this version is the same as in the book, just converted to LightSpeed.
  20.  
  21. The second program is 'ShowOff 7-2' this is the debugged version and matches, with the conditions stated above, the book program 'Listing 7-2'
  22.  
  23.  
  24. ========================================================
  25. === Instructions For Running Under LightSpeed Pascal ===
  26. ========================================================
  27.  
  28. From within the LightSpeed program:  (SUBSTITUTE THE PROGRAM VERSION FOR 'X').
  29.  
  30.   1) Select 'NEW PROJECT' from the 'PROJECT menu. Name it 'ShowOff 7-X.proj'.
  31.   2) Add the file to the project using the 'ADD FILE' selection under
  32.      'PROJECT'.                                                          
  33.   3) Choose the 'RUN OPTIONS' under 'PROJECT' and pick 'use resource file'.
  34.      Pick the resource file 'ShowOff 7-X.Rsrs' for use when compiling}
  35.   4) Select 'GO' and you'll be off and running.
  36.  
  37. That's all there is to getting it to run, have fun.
  38.  
  39. Thanks goes to Larry Rosenstein of Apple for his help in setting me straight on a couple of subjects during my learning curve on the Mac.
  40.  
  41. Stephen Scandalis
  42.